package com.pignest.hotel.beans;

import java.util.Date;

import com.pignest.hotel.annotation.Bean;
import com.pignest.hotel.beans.global.BaseBean;

@Bean("借用物品")
public class TbLiveGoodsBorrow extends BaseBean {
	private static final long serialVersionUID = 8803982939202294681L;
	
	private Living living;
	private TbGoods tbGoods;
	private Date time;
	private Date backtime;
	private int count;

	// Constructors

	/** default constructor */
	public TbLiveGoodsBorrow() {
	}

	/** minimal constructor */
	public TbLiveGoodsBorrow(String id) {
		this.id = id;
	}

	/** full constructor */
	public TbLiveGoodsBorrow(String id, Living living,
			TbGoods tbGoods, Date time, Date backtime, int count) {
		this.id = id;
		this.living = living;
		this.tbGoods = tbGoods;
		this.time = time;
		this.backtime = backtime;
		this.count = count;
	}

	// Property accessors

	public Living getLiving() {
		return living;
	}

	public void setLiving(Living living) {
		this.living = living;
	}

	public TbGoods getTbGoods() {
		return this.tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}

	public Date getTime() {
		return this.time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Date getBacktime() {
		return this.backtime;
	}

	public void setBacktime(Date backtime) {
		this.backtime = backtime;
	}

	public int getCount() {
		return this.count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	@Override
	public String toSimpleString() {
		return concat(living.getRoom().getName(), tbGoods.getName(), String.valueOf(count));
	}
}